Module modules.constants
File name: constants.py Author: Martin Jůda Python Version: 3.7 Description: Module with constants and app settings
Expand source code
"""
File name: constants.py
Author: Martin Jůda
Python Version: 3.7
Description: Module with constants and app settings
"""
# Database connection string (ip address, user, password, table)
DB_CONNECTION_STRING = "postgresql+psycopg2://username:password@127.0.0.1/Database"
# Stag API URP
STAG_BASE_URL = "https://stag-ws.jcu.cz/ws/services/rest2"
# Stag API user name
STAG_USER_NAME = ""
# Stag API user's password
STAG_USER_PASSWORD = ""
# STAG API HTTP basic authorization
STAG_AUTH = (STAG_USER_NAME, STAG_USER_PASSWORD)
# Name of subject in database that should be when there is no
# completed subject for student
DEFAULT_SUBJECT_NAME = "DEFAULT"
# Default number of questions if client not specify value
DEFAULT_NUMBER_OF_QUESTIONS = 3
# Maximum of allowed question count requested by client
MAX_NUMBER_OF_QUESTIONS = 10
# Path to error log file
LOG_FILE_PATH = "error.log"
# Credentials for clients HTTP Basic authorization
CREDENTIALS = {"username": "password"}
# Code of study programme that represents all students
DEFAULT_PERMISSION = "ALL"